import request from '../../../utils/unirequest';
import type { LuchResponse } from '../../../type/common';
import type { TodoStatistics, ISysNotificationView, ISysNotificationQuery, EmployeeStatusStats, EmployeeDetailStats } from './interface';

export default function useWorkApi() {
  return {
    // 获取待办事项统计
    GetStatistics: (): Promise<TodoStatistics> => request.get('/api/systodocenter/getstatistics'),

    // 消息通知相关接口
    async search(data: ISysNotificationQuery): Promise<LuchResponse<ISysNotificationView[]>> {
      return await request.post('/api/SysNotification/Search', data);
    },

    // 获取员工状态统计数据
    getEmployeeStatusStatistics: (): Promise<EmployeeStatusStats> =>
      request.get('/api/sysperson/getstatisticsdata'),

    // 获取员工分布统计数据
    getEmployeeDistributionStatistics: (): Promise<EmployeeDetailStats> =>
      request.get('/api/sysperson/getpiestatistics'),
  }
}



